package com.xs.designs.observer.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
public class XushuService {

    @Autowired
    ApplicationEventPublisher applicationEventPublisher;


    @PostConstruct
    public void init(){
        applicationEventPublisher.publishEvent(new XushuEvent("徐庶666"));
    }
}
